#ifndef COLUMNREFERENCE_H
#define COLUMNREFERENCE_H
#include "primaryExpression.h"

/*Class: ColumnReference
 *	A Class that represents a column reference primary expressions.
 *See Also: <PrimaryExpression> <Expression>
 */
class ColumnReference: public PrimaryExpression {

protected:
	/* Variable tableId:
	 *	Name of the table or view where the column is.
	 */
	std::string tableId;

	 /* Variable columnId:
	 * Name of the referenced column.
	 */
	std::string columnId;
public:
	/*Constructor:ColumnReference
	 * Initialize the object with the specified parameters.
	 * Parameters:
	 * 	tableName - Table or view name.
	 * 	columnName - Column name.
	 */
	ColumnReference(std::string tableName="",std::string columnName="");

	ColumnReference(const ColumnReference & other);

	virtual ~ColumnReference();

	virtual Expression * clone();
	inline void setTableId(std::string tid){tableId=tid;};
	inline void setColumnId(std::string cid){columnId=cid;};
	inline std::string getTableId() {return tableId;};
	inline std::string getColumnId() {return columnId;};
	std::string toString();
};
#endif
